<!-- 搜索列表页 -->
<template>
	<view>
		<ShopList :keyword='keyword'></ShopList>
	</view>
</template>

<script>
	import ShopList from '@/components/common/ShopList.vue'
	export default {
		data() {
			return {
				keyword: ""
			}
		},
		onLoad(e) {
		  this.keyword = e.keyword;
		},
		onReady(e) {//https://ask.dcloud.net.cn/article/40692 
			console.log("data", e);
			// #ifdef APP-PLUS  
			console.log("APP-PLUS")
			var webView = this.$mp.page.$getAppWebview();
			webView.setTitleNViewSearchInputText(e.keyword);
			// #endif

			// #ifdef H5   
			 			console.log("H5 ")
			var searchInputDom = document.querySelector(".uni-input-input[type=search]");
			var evt = new UIEvent('input', {
				bubbles: false,
				cancelable: false
			});
			searchInputDom.value = this.keyword;
			searchInputDom.dispatchEvent(evt);
			// #endif  
		



	},
	components: {
			ShopList
		},
		methods: {

		}
	}
</script>

<style>

</style>